//
//  LZScreenExtension.swift
//  halikaPeso
//
//  Created by L-zh on 2024/12/16.
//

import UIKit

extension UIScreen {
    /// 屏幕的宽度
    ///
    /// - Returns: ScreenWidth
    class func appWidth() -> CGFloat {
        
        return UIScreen.main.bounds.size.width
    }
    
    /// 屏幕的高度
    ///
    /// - Returns: ScreenHeight
    class func appHeight() -> CGFloat {
        
        return UIScreen.main.bounds.size.height
    }
    
    /// 屏幕宽高比
    ///
    /// - Returns: ScreenWidth / ScreenHeight
    class func appScale() -> CGFloat {
        
        let w = CGFloat(UIScreen.appWidth())
        let h = CGFloat(UIScreen.appHeight())
        
        return w / h
    }
}
